import request from '@/axios'

//分页查询微服务
export const pageApi = (data) => {
  return request.post({ url: '/dbms-server/base/app/page', data })
}

//删除微服务
export const delApi = (appName: string) => {
  return request.delete({ url: '/dbms-server/base/app/delete', params: { appName } })
}

//新增微服务
export const addApi = (data) => {
  return request.post({ url: '/dbms-server/base/app/add', data })
}

//修改微服务
export const updateApi = (data) => {
  return request.put({ url: '/dbms-server/base/app/update', data })
}

//获取微服务
export const getApi = (params) => {
  return request.get({ url: '/dbms-server/base/app/get', params })
}

//获取微服务权限地址
export const getAppPathsApi = (params?) => {
  return request.get({ url: '/dbms-server/base/app/getAppPaths', params })
}

//获取微服务列表
export const listApi = () => {
  return request.get({ url: '/dbms-server/base/app/list' })
}
